{template 'header'}
<link rel="stylesheet" href="{CSS_URL}store.css"/>
<!--当前位置-->
<div class="location layout960">
	当前位置: <a href="{SITE_URL}">首页</a>&nbsp;»&nbsp; <a href="{url('store/list')}">车企在线店</a>
</div>
<!--当前位置 end-->
<!--主体部分-->
<div class="cooper-hd layout960 fn-clear">
	<h2 class="fn-left">车企在线店</h2>
	<a class="join" href="{url('store/join')}">在线店加盟</a>
</div>
<div class="layout960 mt10 fn-clear">
	<!--左侧 start-->
	<div class="layout-1of2 fn-left">
		<div class="online-intro fn-clear">
			<div class="intro-text bd fn-left">
				<h2>{$item[company]}</h2>
				<dl class="fn-clear">
					<dt>地址：</dt>
					<dd>{$item[address]}</dd>
				</dl>
				<dl class="fn-clear">
					<dt>电话：</dt>
					<dd>{$item[telephone]}</dd>
				</dl>
				<dl class="fn-clear">
					<dt>经营项目：</dt>
					<dd>{$item[business]}</dd>
				</dl>
				<dl class="fn-clear">
					<dt>商家状态：</dt>
					<dd>{Im::web($item[userid])}</dd>
				</dl>
			</div>
			<div class="auto-series-imgs fn-right">
				<ul id="J_Big" class="big-img">
					{if $picList}
						{loop $picList $k $v}
						<li>
							<img src="{Picture::thumb($v, 385, 295)}" width="385" height="295" >
						</li>
						{/loop}
					{else}
						<li>
							<img src="{Picture::thumb('', 385, 295)}" width="385" height="295" >
						</li>
					{/if}
				</ul>
				<ul id="J_Thumbnail" class="thumbnail fn-clear">
					{if $picList}
					{loop $picList $k $v}
					<li><img src="{Picture::thumb($v, 85, 60)}" ><i class="up-tri" {if $k==0}style="display: none"{/if}></i></li>
					{/loop}
					{else}
					<li><img src="{Picture::thumb('', 85, 60)}" ><i class="up-tri" ></i></li>
					{/if}
				</ul>
			</div>
		</div>
		<div class="mt10 bd">
			<div class="hd-bg-30">
				<h2 class="cblue">详细信息</h2>
			</div>
			<div class="content " style="font-size: 14px">
				<p>{$item[content]}</p>
			</div>
		</div>
	</div>
	<!--左侧 end-->
	<!--右侧 start-->
	<div class="layout-2of2 fn-right">
		<div class="online-map bd">
			<iframe src="{SITE_URL}api.php?aM=map&aA=coshop&lang={$item[langitude]}&lat={$item[latitude]}&cityName={Area::name($item[areaid])}&name={urlencode($item[company])}&phone={urlencode($item[telephone])}&addr={urlencode(Area::pos($item['areaid'], '').$item[address])}" frameborder='0' scrolling="no" width="300" height="250"></iframe>
			<input class="jsShopName" type="hidden" value="{$item[company]}">
			<input class="jsShopPhone" type="hidden" value="{$item[telephone]}">
			<input class="jsShopAddr" type="hidden" value="{Area::pos($item['areaid'])}{$item[address]}">
			<input class="jsShopPoint" type="hidden"
			{if $item[langitude] && $item[latitude]}
			value="{$item[langitude]},{$item[latitude]}"
			{else}
			value="{Area::name($item[areaid])}"
			{/if}
			>
			<a class="jsWholeMap" href="javascript:void(0);" onclick="return false">查看全图>></a>
		</div>
		<div id="whole-map" class="whole-map">
			<p>地址：<span id="shopAddr"></span></p>
			<a id="iframeUrl" href="http://www.ixdcw.net/api.php?aM=map&aA=coshopBig" class="fn-hide"></a>
		</div>
		<iframe src="{SITE_URL}extend/fragment.php?modules=news&psize=10"  scrolling="no" frameborder="0" height='303'></iframe>
		<iframe src="{SITE_URL}extend/fragment.php?modules=guide&psize=6"  scrolling="no" frameborder="0" height='445'></iframe>
	</div>
	<!--右侧 end-->
</div>
<!--主体部分end-->
<script>
	seajs.use(['$','lm-util','common','easyui','easyui-css'],function($,util){
		util.showThumbnail("#J_Big","#J_Thumbnail");
		//地图
		$('#whole-map').dialog({
			title:'全图',
			width:785,
			height:500,
			closed:true
		});
		$('.jsWholeMap').click(function(){
			var addr = $(".jsShopAddr").val(),
					name = $(".jsShopName").val(),
					phone = $(".jsShopPhone").val(),
					point = $(this).siblings('.jsShopPoint').val().split(','),
					iframeHtml,
					iframeUrl = $("#iframeUrl").attr("href");
			$('#whole-map').find('#shopAddr').text(addr);
			var paramName = name.length>0 ? "&name="+encodeURI(name) : "",
					paramPhone = phone.length>0 ? "&phone="+encodeURI(phone) : "",
					paramAddr = addr.length>0 ? "&addr="+encodeURI(addr) : "",
					paramPoint = point.length==2 ? '&lang='+point[0]+'&lat='+point[1] : point.length==0 ? "" : '&cityName='+encodeURI(point[0]),
					param = paramPoint+paramName+paramPhone+paramAddr;
			iframeHtml='<iframe src="'+iframeUrl+param+'" frameborder="0" scrolling="no" width="750" height="400"></iframe>';
			$('#whole-map').find('iframe').remove();
			$(iframeHtml).insertAfter($('#whole-map').find('p'));
			$('#whole-map').dialog({
				closed:false
			});
		});
	})
</script>
{template 'footer'}